-- phpMyAdmin SQL Dump
-- version 3.2.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 29, 2010 at 07:37
-- Server version: 5.1.41
-- PHP Version: 5.3.1

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Database: `confroommgr`
--
DROP DATABASE `confroommgr`;
CREATE DATABASE `confroommgr` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `confroommgr`;

-- --------------------------------------------------------

--
-- Table structure for table `bookings`
--

CREATE TABLE IF NOT EXISTS `bookings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_confroom` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `pin` int(4) NOT NULL DEFAULT '0',
  `pin2` int(4) NOT NULL DEFAULT '0',
  `bookedfrom` datetime NOT NULL,
  `bookedto` datetime NOT NULL,
  `bookedby` varchar(100) NOT NULL,
  `bookedat` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `email` varchar(255) NOT NULL,
  `email_text` text NOT NULL,
  `email_talker` text NOT NULL,
  `email_listener` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `calls`
--

CREATE TABLE IF NOT EXISTS `calls` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_booking` int(11) NOT NULL,
  `number` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `connect` datetime NOT NULL,
  `disconnect` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `confrooms`
--

CREATE TABLE IF NOT EXISTS `confrooms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ext` int(4) NOT NULL,
  `description` varchar(255) NOT NULL,
  `bookable` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

INSERT INTO `confrooms` (`id`, `ext`, `description`, `bookable`) VALUES
(1, 7700, 'Conference Room 1', 1),
(2, 7701, 'Conference Room 2', 1),
(3, 7702, 'Conference Room 3', 1);